home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan
/
Opus 5 - Magellan.iso
/
Extras
/
DLGoodies
/
tolower.dopus5
< prev
next >
Wrap
Text File
|
1996-08-29
|
881b
|
48 lines
/*
* Convert all selected file and directory entries to lowercase.
* Usefull for ISO 9660 CD Roms.
*
* V1.0 (29.8.96) by David Lübbren.
*
* Call: Arexx DOpus5:ARexx/tolower.dopus5 {Qp}
*
* TODO:
* Directory recursion.
*/
OPTIONS RESULTS
PARSE ARG dopusport
IF dopusport ~= "" THEN ADDRESS VALUE dopusport
ELSE DO
SAY "No DOpus running !"
EXIT
END
lister query source
IF rc = 0 THEN DO
PARSE VAR result handle .
lister query handle path
IF rc = 0 THEN DO
SourcePath = STRIP(result, 'B', '"')
lister query handle selentries stem Entry.
END
ELSE DO
Beep
EXIT 5
END
END
ELSE do
Beep
EXIT 5
END
DO i=0 TO Entry.count-1
lname = TRANSLATE(Entry.i, XRANGE('a', 'z'), XRANGE('A', 'Z'))
ADDRESS COMMAND 'Rename >NIL: "'SourcePath || Entry.i'" "'SourcePath || lname'" QUIET'
END
lister read handle '"'SourcePath'"' force